<%@page import="JDBC.dbConn"%>
<%@ page language="java" import="java.util.*,java.sql.*" pageEncoding="utf-8"%>
	<%@page import="VO.User" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"+ request.getServerName() + ":" + request.getServerPort()+ path + "/";
%>
<%@page import="JDBC.DATABASE"%>

<html>
<head>
<title>场地预约</title>
  <link rel="stylesheet" type="text/css" href="css/public.css">
  <link rel="stylesheet" type="text/css" href="css/ground_book2.css"/>
</head>
<body>
  <div id="mainbody">
<%
String account=null;
User user=(User)session.getAttribute("user");
 account=user.getAccount(); 
 %>
	<script src="js/date.js"></script>
	<iframe src="book_msg.jsp"  frameborder="0" id="frame"></iframe>
 	
	<form method="post" action="servlet/ground_book">
		<script>
			var c = new Calendar("c");
			document.write(c);
		</script>
		日期: <input type="text" name="date"
			onfocus="c.showMoreDay = false;c.show(this);" />
		时间段： <select name="time">
			<option>--请选择--</option>
			<option value="07:00-09:00">07:00-09:00</option>
			<option value="09:00-11:00">09:00-11:00</option>
			<option value="11:00-13:00">11:00-13:00</option>
			<option value="13:00-15:00">13:00-15:00</option>
			<option value="15:00-17:00">15:00-17:00</option>
			<option value="17:00-19:00">17:00-19:00</option>
		</select>  场地： <select name="ground">
			<option>--请选择--</option>
			<%
				String sql = "SELECT * FROM GROUND ";
				ResultSet rs = DATABASE.query(sql);
				while (rs.next()) {
			%>
			<option value=<%=rs.getString("NAME")%>><%=rs.getString("NAME")%></option>
			<%
				}
			%>
		</select><br>
		<input name="account" type="hidden" value="<%= account %>">
		 <input type="submit" value="预约">
	</form>
	</div>
</body>
</html>